package com.example.czy.vo;

import com.baomidou.mybatisplus.annotation.SqlCondition;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;

import java.math.BigDecimal;
import java.time.LocalDateTime;
import java.util.Arrays;
import java.util.List;
import java.util.stream.Collectors;

/**
 * 商品
 *
 * @author czy
 * @date 2022-02-25
 */
@Data
public class GoodsVO  {
    private static final long serialVersionUID = 1L;
    /**
     * ID
     */
    @Schema(description = "ID")
    private Long id;
    /**
     * 名称
     */
    @Schema(description = "名称")
    @TableField(condition = SqlCondition.LIKE)
    private String name;
    /**
     * 横向log链接
     */
    @Schema(description = "横向log链接")
    private String transverseLogUrl;
    /**
     * 纵向log链接
     */
    @Schema(description = "纵向log链接")
    private String verticalLogoUrl;
    /**
     * 分类 字典ID
     */
    @Schema(description = "分类 字典ID")
    private Long typeDicId;
    /**
     * 采购价（元）
     */
    @Schema(description = "采购价（元）")
    private BigDecimal purchasePrice;
    /**
     * 银行价（元）
     */
    @Schema(description = "银行价（元）")
    private BigDecimal bankPrice;
    /**
     * 原价（元）
     */
    @Schema(description = "原价（元）")
    private BigDecimal originalPrice;
    /**
     * 销售价（元）
     */
    @Schema(description = "销售价（元）")
    private BigDecimal sellingPrice;

    /**
     * 积分数
     */
    @Schema(description = "积分数")
    private Integer integralQuantity;

    /**
     * 库存
     */
    @Schema(description = "库存")
    private Long inventory;

    /**
     * 总数
     */
    @Schema(description = "总数")
    private Long total;


    /**
     * 采购有效期
     */
    @Schema(description = "采购有效期")
    private LocalDateTime purchaseValidity;
    /**
     * 用户有效期
     */
    @Schema(description = "用户有效期")
    private LocalDateTime userValidity;

    /**
     * 展示字典ID 1-地址型 2-二维码 3-直冲型 4-复制码
     */
    @Schema(description = "展示字典ID 1-地址型 2-二维码 3-直冲型 4-复制码")
    private Long showDicId;

    /**
     * 商户ID
     */
    @Schema(description = "商户ID")
    private Long merchantsId;

    /**
     * 运营商ID
     */
    @Schema(description = "运营商ID")
    private Long operatorId;

    /**
     * 上架：1-是  0-否
     */
    @Schema(description = "上架：1-是  0-否")
    private String putawayFlag;

    /**
     * 上架时间
     */
    @Schema(description = "上架时间")
    private LocalDateTime putawayTime;

    /**
     * 下架时间
     */
    @Schema(description = "下架时间")
    private LocalDateTime removeTime;

    /**
     * 简介
     */
    @Schema(description = "简介")
    private String description;

    public static void main(String[] args) {
        String input = "HelloWorld  ";
        List<String> content = Arrays.stream(input.split(" ",2)).collect(Collectors.toList());

        for (String s : content) {
            System.out.println(s);
        }

    }
}
